<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="../head.jsp">
	<jsp:param value="修改学员信息" name="title" />
</jsp:include>
<script type="text/javascript">
	$(function() {
		$(".opop").click(function() {
			if ($(this).text() != 0) {
				$('.ui.modal').modal('show');
			}
			ajax({
				url : "student/checkrecordAjax?sid=" + $(this).attr('value'),
				callback : function(xmlhttp) {
					var ddd = document.getElementById('record');
					ddd.innerHTML = "";
					var jsonStr;
					if (window.JSON) {
						jsonStr = JSON.parse(xmlhttp.response);
					} else {
						jsonStr = eval("(" + xmlhttp.response + ")");
					}
					if (jsonStr) {
						for (var i = 0; i < jsonStr.length; i++) {
							var item = jsonStr[i];
							var div = document.createElement("div");
							$(div).addClass("ui tall stacked segment");
							var op1 = document.createElement("span");
							var op2 = document.createElement("span");
							op1.innerText = "跟进方式：" + item.grad_way;
							op2.innerText = "得到的信息：" + item.grad_record;
							$(op2).css("padding-left", "100px");
							div.appendChild(op1);
							div.appendChild(op2);
							ddd.appendChild(div);
						}
					}
				}
			});
		});
	});
</script>
</head>
<body>
	<div class="container">
		<div class="row">
			<div id="content" class="col-lg-12">
				<div class = "dao">		
					<a class="section" href = "manager">学员管理</a>
					<i class="right chevron icon divider"></i>
					<span class="active section">毕业学员</span>							
				</div>
				<div class="row">
					<div class="col-md-12">
						<!-- BOX -->
						<div class="box border blue">
							<div class="box-title">
								<h4>毕业学员列表</h4>
							</div>
							<div class="box-body center">
								<table id="datatable2" cellpadding="0" cellspacing="0" border="0" class="datatable table table-striped table-bordered table-hover">
									<thead >
										<tr style = "text-align: center">
										<th>姓名</th>
										<th>性别</th>
										<th>工作地址</th>
										<th>公司</th>
										<th>电话</th>
										<th>qq</th>
										<th>薪水</th>
										<th>就业时间</th>
										<th>联系次数</th>
										<th>状态</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${graduates }" var="grad">
										<tr class="gradeX">
											<td><a href="student/addcompanyinf?id=${grad.gradId }">
												${grad.gradName }</a></td>
												<td>${grad.gradGender }</td>
												<td>${grad.gradWorkplace }</td>
												<td>${grad.gradCompany }</td>
												<td>${grad.gradTelphone }</td>
												<td>${grad.gradQQ }</td>
												<td>${grad.gradSalary }</td>
												<td>${grad.gradJobTime }</td>
												<td><a class="opop" value="${grad.gradId}">${grad.recordCount }</a></td>
												<td>${grad.statueName }</td>
												<td><a href="student/addrecord?id=${grad.gradId }">新增记录</a></td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="ui modal" style="width: 800px; margin-top: -86px; height: 300px;">
				<i class="close icon"></i>
				<div class="header">联系记录</div>
				<div style="color: black;" id="record"></div>
			</div>
</body>
</html>